import App from './App.vue'
import request from './common/request'
import emotion from './common/emotion'
import { enums } from './common/enums'
import dateUtils from './common/date'
import wsApi from './common/wssocket'
import store from './store'
import { createSSRApp } from 'vue'

export function createApp() {
  const app = createSSRApp(App)
  app.use(store)
  app.config.globalProperties.$http = request
  app.config.globalProperties.$wsApi = wsApi
  app.config.globalProperties.$emo = emotion
  app.config.globalProperties.$enums = enums
  app.config.globalProperties.$date = dateUtils

  return {
    app
  }
}
